package dawnland03.data.map.algorithm.neigbours;

import dawnland03.data.map.algorithm.DefaultMatrixCellIArgumentMatcher;
import dawnland03.data.map.model.MatrixCell;

/**
 * User: Petru Obreja (obrejap@yahoo.com)
 * Date: Feb 6, 2010
 * Time: 11:37:03 AM
 */
public class TypeMatrixCellIArgumentMatcher extends DefaultMatrixCellIArgumentMatcher {
    private Integer type;

    public TypeMatrixCellIArgumentMatcher(Integer type) {
        this.type = type;
    }

    public boolean matches(Object o) {
        if (!(o instanceof MatrixCell)) {
            return false;
        }
        MatrixCell matrixCell= (MatrixCell) o;
        return matrixCell.getType().equals(type);
    }
}
